package model

import (
	"database/sql"
	"time"
)

type TableFile struct {
	Id       int            `gorm:"primary_key, auto_increment"`
	FileHash string         `gorm:"column:file_sha1;type:varchar(40);not null"`
	FileName sql.NullString `gorm:"column:file_name;type:varchar(256);"`
	FileSize sql.NullInt64  `gorm:"column:file_size;type:bigint(20);"`
	FileAddr sql.NullString `gorm:"column:file_addr;type:varchar(1024);"`
	CreateAt time.Time      `gorm:"column:create_at;type:datetime;not null"`
	UpdateAt time.Time      `gorm:"column:update_at;type:datetime;not null"`
	Status   int            `gorm:"column:status;type:int(11);not null"`
}

func (TableFile) TableName() string {
	return "tbl_file"
}
